<layout name='Layout/layout_page' />
<script type="text/javascript">
$(document).ready (function(){
	$(".preview").preview();
});

function jumpUrl(){
  v = document.getElementById("path").options[document.getElementById("path").selectedIndex].value;
  url="<{:U('Article/index')}>&path=" + v;
  window.location.href=url;
}
</script>

	<ol class="breadcrumb">
		<li><a href="<{:U('Article/index')}>"><{:L('_menu_article')}></a></li>
      	<li class="active"><{:L(_public_list)}></li>
    </ol>
	
	<form class="form-inline" method="get" action="index.php">
		<div class="form-group">
    		<label><{:L('_public_cate')}></label>
    		<select name="path" id="path" class="form-control input-sm" onchange="jumpUrl()">
				<option value="">All</option>
				<volist name="sclass" id="vo">
				<option value='<{$vo['path']}>'><php>
		            for($i=0; $i<$vo['count']*2; $i++){
		               echo '&nbsp;&nbsp;';            
		            }
		        </php><{$vo['name']}></option>
				</volist>
			</select>
  		</div>

  		<div class="form-group">
    		<label>Keywords</label>
    		<input type="text" class="form-control input-sm" name="key">
  		</div>
		<button type="submit" class="btn btn-default btn-sm"><{:L('_public_search')}></button>
		<input type="hidden" name="m" value="Admin" />
		<input type="hidden" name="c" value="Article" />
		<input type="hidden" name="a" value="index" />
	</form>

	<p></p>
	
	<form id="ajaxForm" method="post" action="<{:U('Article/del')}>" name="form1" class="form-horizontal form-validata">
	<TABLE class="table table-striped table-bordered table-hover">
	  <THEAD>
		<tr>
		  <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> <{:L("_public_select")}></TH>
		  <TH>id</TH>
		  <TH>Title</TH>
		  <TH>Category</TH>
		  <TH>Sort</TH>
		  <TH>Editer</TH>
		  <TH>Date added</TH>
		  <TH>Date update</TH>
		  <TH>Action</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"></td>
			  <td><{$vo.id}></td>
			  <td><a href="<{:U('Article/edit' , array('id'=>$vo['id']))}>" class="preview" alt="<{$vo.picname}>" title="<{$vo.title}>"><{$vo.title}></a></td>
              <td><a href="<{:U('Article/index',array('path'=>$vo['path']))}>"><{$cate[$vo['cid']]}></a></td>
              <td><{$vo.sort}></td>
              <td><{$vo.editer}></td>
              <td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
              <td><{$vo.updateTime|date='Y-m-d H:i:s',###}></td>
			  <td>
			  	<a href="<{:U('Article/edit' , array('id'=>$vo['id']))}>" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> <{:L("_public_edit")}></a>
			  </td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<div class="row">
		<div class="col-md-6">
			<button class="btn btn-info btn-sm" onClick="if(!confirm('Cannot be recovered after deletion!'))return false;"><i class="glyphicon glyphicon-trash"></i> Delete selected message</button>
		</div>
		
		<div class="col-md-6">
			<div class="page">
				<nav>
  					<ul class="pagination"><{$page}></ul>
  				</nav>
  			</div>
		</div>
	</div>
	</form>

<script type="text/javascript">
$("#path").val("<{$path}>");
</script>

<input type="hidden" id="menu_action" value="article" />